package edu.uts.reekie.designer.actions;

import org.eclipse.ui.IWorkbenchPart;

import edu.uts.reekie.designer.model.AbstractConnector;

public class ClearTargetToSourceConnectorLabelAction extends
		ClearConnectorLabelAction {
	

	public static final String TARGET_TO_SOURCE = "Clear Target->Source Label";

	public ClearTargetToSourceConnectorLabelAction(IWorkbenchPart part) {
		super(part);
		
	}
	protected boolean canPerformAction(AbstractConnector connector) {
		// return true if the connector has a label value
		
		if (connector.getTargetToSourceLabel()!=null)
			return true;
		
		return false;
	
	}
	
	protected String generateId() {
		return TARGET_TO_SOURCE;
	}
}
